/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package CapaDatos;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author langeblanc
 */
@Entity
@Table(name = "historico", catalog = "marengo", schema = "")
@NamedQueries({
    @NamedQuery(name = "Historico.findAll", query = "SELECT h FROM Historico h"),
    @NamedQuery(name = "Historico.findByIdhistorico", query = "SELECT h FROM Historico h WHERE h.idhistorico = :idhistorico"),
    @NamedQuery(name = "Historico.findByFechaOperacion", query = "SELECT h FROM Historico h WHERE h.fechaOperacion = :fechaOperacion"),
    @NamedQuery(name = "Historico.findByHoraInicio", query = "SELECT h FROM Historico h WHERE h.horaInicio = :horaInicio"),
    @NamedQuery(name = "Historico.findByHoraFin", query = "SELECT h FROM Historico h WHERE h.horaFin = :horaFin"),
    @NamedQuery(name = "Historico.findByPHagua", query = "SELECT h FROM Historico h WHERE h.pHagua = :pHagua"),
    @NamedQuery(name = "Historico.findByCaudalEntrada", query = "SELECT h FROM Historico h WHERE h.caudalEntrada = :caudalEntrada"),
    @NamedQuery(name = "Historico.findByCaudalSalida", query = "SELECT h FROM Historico h WHERE h.caudalSalida = :caudalSalida"),
    @NamedQuery(name = "Historico.findByNivelTanque", query = "SELECT h FROM Historico h WHERE h.nivelTanque = :nivelTanque")})
public class Historico implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "idhistorico", nullable = false)
    private Integer idhistorico;
    @Basic(optional = false)
    @Column(name = "fecha_operacion", nullable = false)
    @Temporal(TemporalType.DATE)
    private Date fechaOperacion;
    @Basic(optional = false)
    @Column(name = "hora_inicio", nullable = false)
    @Temporal(TemporalType.TIME)
    private Date horaInicio;
    @Basic(optional = false)
    @Column(name = "hora_fin", nullable = false)
    @Temporal(TemporalType.TIME)
    private Date horaFin;
    @Basic(optional = false)
    @Column(name = "pH_agua", nullable = false, precision = 5, scale = 2)
    private BigDecimal pHagua;
    @Basic(optional = false)
    @Column(name = "caudal_entrada", nullable = false, precision = 5, scale = 2)
    private BigDecimal caudalEntrada;
    @Basic(optional = false)
    @Column(name = "caudal_salida", nullable = false, precision = 5, scale = 2)
    private BigDecimal caudalSalida;
    @Basic(optional = false)
    @Column(name = "nivel_tanque", nullable = false, precision = 5, scale = 2)
    private BigDecimal nivelTanque;

    public Historico() {
    }

    public Historico(Integer idhistorico) {
        this.idhistorico = idhistorico;
    }

    public Historico(Integer idhistorico, Date fechaOperacion, Date horaInicio, Date horaFin, BigDecimal pHagua, BigDecimal caudalEntrada, BigDecimal caudalSalida, BigDecimal nivelTanque) {
        this.idhistorico = idhistorico;
        this.fechaOperacion = fechaOperacion;
        this.horaInicio = horaInicio;
        this.horaFin = horaFin;
        this.pHagua = pHagua;
        this.caudalEntrada = caudalEntrada;
        this.caudalSalida = caudalSalida;
        this.nivelTanque = nivelTanque;
    }

    public Integer getIdhistorico() {
        return idhistorico;
    }

    public void setIdhistorico(Integer idhistorico) {
        this.idhistorico = idhistorico;
    }

    public Date getFechaOperacion() {
        return fechaOperacion;
    }

    public void setFechaOperacion(Date fechaOperacion) {
        this.fechaOperacion = fechaOperacion;
    }

    public Date getHoraInicio() {
        return horaInicio;
    }

    public void setHoraInicio(Date horaInicio) {
        this.horaInicio = horaInicio;
    }

    public Date getHoraFin() {
        return horaFin;
    }

    public void setHoraFin(Date horaFin) {
        this.horaFin = horaFin;
    }

    public BigDecimal getPHagua() {
        return pHagua;
    }

    public void setPHagua(BigDecimal pHagua) {
        this.pHagua = pHagua;
    }

    public BigDecimal getCaudalEntrada() {
        return caudalEntrada;
    }

    public void setCaudalEntrada(BigDecimal caudalEntrada) {
        this.caudalEntrada = caudalEntrada;
    }

    public BigDecimal getCaudalSalida() {
        return caudalSalida;
    }

    public void setCaudalSalida(BigDecimal caudalSalida) {
        this.caudalSalida = caudalSalida;
    }

    public BigDecimal getNivelTanque() {
        return nivelTanque;
    }

    public void setNivelTanque(BigDecimal nivelTanque) {
        this.nivelTanque = nivelTanque;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idhistorico != null ? idhistorico.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Historico)) {
            return false;
        }
        Historico other = (Historico) object;
        if ((this.idhistorico == null && other.idhistorico != null) || (this.idhistorico != null && !this.idhistorico.equals(other.idhistorico))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "CapaDatos.Historico[idhistorico=" + idhistorico + "]";
    }

}
